package org.example.api;

import org.example.vo.DeptVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author 天天向上 （john.yi@qq.com）
 * @date 2020/9/4.
 */
@FeignClient(value = "dept-service",
        /*fallback = DeptServiceApiFallback.class,*/
        fallbackFactory = DeptServiceApiFallbackFactory.class
)
public interface DeptServiceApi {
    @GetMapping("/depts/obj/{id}")
    DeptVo byId2(@PathVariable Integer id);

    @GetMapping("/depts/{id}")
    String byId(@PathVariable Integer id);
}
